home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d27 / bfrcmp.arc / BFRCMP.DOC < prev    next >
Text File  |  1990-06-03  |  1KB  |  24 lines

  1. bfrcmp - compare buffers
  2. This is an asm routine written to illustrate interfacing and assembly
  3. of a multisized model assembler program to a c program.  It is for learning.
  4.  
  5. The routine could have been written in c but was not in order to exploit
  6. the string compare instructions on the Intel iAPX86 family.
  7.  
  8. You call this program as follows:
  9.  
  10. extern int bfrcmp(char *ptr1, char *ptr2, unsigned size)
  11.  
  12. ptr1 and ptr2 point to the two areas to compare and size is the length of the
  13. areas. chkbfr, a test routine, shows the use of the function. Checkbfr, a batch
  14. file makes the function, its test program and executes the test.
  15.  
  16. The function returns zero if the size is zero or if the two areas are
  17. identical.
  18.  
  19. The function returns the byte number where the two areas are not identical.
  20.  
  21. Bytes are numbered from 1, and NOT from zero when considering the value of this
  22. function.
  23. See the assembly listing for details of how this routine works.  Free.
  24. In the public domain - not beggarware.